from pattern.circuit import Control

class entry(Control):
    
    def realize(self, event):
        if not hasattr(event.shape, "label"):
            event.shape.label = "Update"
    
    def please(self, event):
        key, = event.data
        label = event.shape.label
        return '<a class="wikilet_update" href="/update.html#%s">%s</a>' % (key, label)